package com.mayikt.edu.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 登录日志表(UserLoginLog)实体类
 *
 * @author makejava
 * @since 2023-11-02 10:49:04
 */
@Data
@ApiModel("登录日志表")
@TableName(value = "user_login_log")
public class UserLoginLog implements Serializable {
    private static final long serialVersionUID = 448967104245244216L;

    @ApiModelProperty("${column.comment}")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("${column.comment}")
    private Integer userId;

    @ApiModelProperty("${column.comment}")
    private String loginIp;

    @ApiModelProperty("${column.comment}")
    private Date loginTime;

    @ApiModelProperty("${column.comment}")
    private String loginToken;
    /**
     * 渠道
     */
    @ApiModelProperty("渠道")
    private String channel;
    /**
     * 设备信息
     */
    @ApiModelProperty("设备信息")
    private String equipment;

    @ApiModelProperty("${column.comment}")
    private Integer isDelete;

    public UserLoginLog() {
    }

    public UserLoginLog(Integer userId, String loginIp, String loginToken, String equipment) {
        this.userId = userId;
        this.loginIp = loginIp;
        this.loginTime = new Date();
        this.loginToken = loginToken;
        this.equipment = equipment;
    }
}

